#ifndef CONTROL_H
#define CONTROL_H
#include "stm32f4xx.h"
#include "pid.h"
#include "ADRC.h"
#include "imu.h"
#include "timer.h"
#include "motor.h"
#include "ppm.h"
#include "math.h"
#include "structconfig.h"
#include "altitude.h"
#include "ADRC_Altitude.h"
#include "dshot.h"  

extern float Test_light,Test_right,Test_Yaw,Test_yaw;
extern float Moto_1,Moto_2,Moto_3,Moto_4;
extern float speedbase,PWM_BASE,highaim,highaim_min,highaim_max,yaw,yaw_aim,rol,pit,V_X_Aim,V_Y_Aim;
extern float Rol_Aim,Pit_Aim,Yaw_Aim;
extern int Uav_Enable,Auto_Mode,high_flag;
extern PID_TYPE PID_HIGH,PID_HIGH_R,PID_ROL,PID_PIT,PID_ROL_R,PID_PIT_R,PID_YAW_R,PID_YAW,PID_POSITION_X,PID_POSITION_Y;
extern ADRC_Data ADRC_HIGH,ADRC_HIGH_R,ADRC_HIGH_,ADRC_ROL,ADRC_PIT,ADRC_ROL_R,ADRC_PIT_R; 

extern bool UAV_Arming;
extern int16_t dif_PPM_Databuf[10];
	
void Control(void);
void Safety_Check(void);

#endif 

